import React from 'react'
import { History } from 'react-router'

export default React.createClass({
  // mixins: [History],
  // warning: [react-router] the `History` mixin is deprecated
  // please access `context.router` with your own `contextTypes`
  contextTypes: {
    router: React.PropTypes.object.isRequired,
  },
  login(e) {
    this.context.router.push('', '/')
  },
  render() {
    return (
      <form className="login-form" onSubmit={this.login}>
        <button type="submit">LogIn</button>
      </form>
    )
  }
})
